var mod = document.getElementById("modfication")
var save = document.getElementById("save")

var per = document.getElementById("perinform") //基本信息
var money = document.getElementById("money")  // 缴费
var advice = document.getElementById("advice") //意见箱
var renew = document.getElementById("renew")  //借阅与续借

var div01 = document.getElementById("div01")  // 基本信息区域
var div02 = document.getElementById("div02")  // 编辑资料区
var div03= document.getElementById("div03")   // 缴费区域
var div04 = document.getElementById("div04")  // 借阅与续借
var div05 = document.getElementById("div05")//意见箱区域

var num1 = num2 = num3 = num4 = 1

mod.onclick = function ()
{
     div01.style.display = "none"
     div02.style.display = "block"
     div03.style.display = "none"
     div04.style.display = "none"
     div05.style.display = "none"
 }
// save.onclick = function()
// {
//     div01.style.display = "none"
//     div02.style.display = "block"
//     div03.style.display = "none"
//     div04.style.display = "none"
//     div05.style.display = "none"
// }
per.onclick = function()
{
    
        div01.style.display = "block"
        div02.style.display = "none"
        div03.style.display = "none"
        div04.style.display = "none"
        div05.style.display = "none"
        money.style.color = " #45454e"
        per.style.color = ""
        advice.style.color = " #45454e"
        renew.style.color = " #45454e"
      
    
}
money.onclick = function()
{
    if (num2 == 1) {


        div01.style.display = "none"
        div02.style.display = "none"
        div03.style.display = "block"
        div04.style.display = "none"
        div05.style.display = "none"
        money.style.color = "#6f99b4"
        per.style.color = " #45454e"
        advice.style.color = "#45454e"
        renew.style.color = " #45454e"
        num2 = 0
        num1 = num3 = num4 = 1
    }

}
advice.onclick = function()
{
    if (num3 == 1) {
        div01.style.display = "none"
        div02.style.display = "none"
        div03.style.display = "none"
        div04.style.display = "none"
        div05.style.display = "block"
        money.style.color = "#45454e"
        per.style.color = "#45454e"
        advice.style.color = "#6f99b4"
        renew.style.color = "#45454e"
        num3 = 0
        num1 = num2 = num4 = 1
    }
}
renew.onclick = function()
{
    if (num4 == 1) {
        div01.style.display = "none"
        div02.style.display = "none"
        div03.style.display = "none"
        div04.style.display = "block"
        div05.style.display = "none"
        money.style.color = "#45454e"
        per.style.color = "#45454e"
        advice.style.color = "#45454e"
        renew.style.color = "#6f99b4"
        num4 = 0
        num1 = num3 = num4 = 1
    }
   
}

var txt = document.getElementById("txt")
var mail = document.getElementById("newmail");
var numb = document.getElementById("newnum");
var mima = document.getElementById("newmima");
txt.onfocus = function ()
{
    txt.placeholder = ""

}
txt.onblur = function () {
    if (txt.value === "") {
        txt.placeholder = "请输入您对我们的意见与想法"
    }
}
mail.onfocus = function () {
    mail.placeholder = ""

}
mail.onblur = function () {
    if (mail.value === "") {
        mail.placeholder = "请输入新邮箱"
    }
}
numb.onfocus = function () {
    numb.placeholder = ""

}
numb.onblur = function () {
    if (numb.value === "") {
        numb.placeholder = "请输入新电话号码"
    }
}
mima.onfocus = function () {
    mima.placeholder = ""

}
mima.onblur = function () {
    if (mima.value === "") {
        mima.placeholder = "请输入新密码"
    }
}